<!--
  描述：产品图文详情页
  @author yangshuangping
  @since 2021/12/09 17:41
-->
<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">

<head th:include="common/common :: jscss">
    <title>新增或编辑分类</title>
</head>
<body>

<div class="layui-fluid">
    <div class="layui-card">
        <form method="post" action="" class="layui-form" lay-filter="zmn-form">

            <input type="hidden" name="graphicId" th:value="${productGraphic.graphicId}"/>
            <input type="hidden" name="productId" th:value="${servProductVO.productId}"/>

            <div class="layui-card-header" style="margin-top:10px;"><b>基本信息</b></div>
            <div class="layui-split">&nbsp;</div>

            <div class="layui-form-item" th:if="${productGraphic.graphicId > 0}">
                <label class="layui-form-label">ID：</label>
                <div class="layui-input-block">
                    <div class="layui-form-mid">
                        <span th:text="${productGraphic.graphicId}">ID</span>
                        <span th:text="${productGraphic.status == 2 ? '启用' : '禁用'}">status</span>
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label layui-form-required">图片：</label>
                <div class="layui-upload-drag" id="graphicImgUrl" lay-verify="graphicImgUrl">
                    <input type="hidden" id="graphicImgUrlValue" name="graphicImgUrl">
                    <i class="layui-icon"></i>
                    <p>点击上传</p>
                </div>
                <div class="layui-inline" style="width: 200px;">
                    <i onclick="thePreviewImage('graphicImgUrlValue')"
                       class="layui-icon layui-icon-search btn-review"></i>
                    <br>
                    <br>
                    <i onclick="deletePicture('graphicImgUrl')"
                       class="layui-icon layui-icon-delete btn-del funcClass"></i>
                </div>
                <div class="layui-input-inline" style="margin-left: 152px;width: 260px;padding-top: 5px;">
                    <span style="color: red;">格式支持：png|jpg|jpeg，大小< 300kb</span>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label layui-form-required">分组名称：</label>
                <div class="layui-input-block">
                    <div class="layui-input-inline" style="width: 390px">
                        <input type="text" name="graphicGroup"
                               th:value="${productGraphic.graphicGroup}"
                               placeholder="请填写分组名称"
                               lay-verify="graphicGroup" autocomplete="off" class="layui-input" maxlength="10"/>
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label layui-form-required">标题：</label>
                <div class="layui-input-block">
                    <div class="layui-input-inline" style="width: 390px">
                        <input type="text" name="graphicTitle"
                               th:value="${productGraphic.graphicTitle}"
                               placeholder="请填写标题"
                               lay-verify="graphicTitle" autocomplete="off" class="layui-input" maxlength="20"/>
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label layui-form-required">描述：</label>
                <div class="layui-input-block">
                    <div class="layui-input-inline" style="width: 390px">
                        <input type="text" name="graphicDesc" th:value="${productGraphic.graphicDesc}"
                               placeholder="请填写描述"
                               lay-verify="graphicDesc" autocomplete="off" class="layui-input" maxlength="20"/>
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label layui-form-required">链接：</label>
                <div class="layui-input-block">
                    <div class="layui-input-inline" style="width: 390px">
                        <input type="text" name="graphicLink" th:value="${productGraphic.graphicLink}"
                               placeholder="请填写链接"
                               lay-verify="graphicLink" autocomplete="off" class="layui-input" maxlength="200"/>
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label layui-form-required">wap链接：</label>
                <div class="layui-input-block">
                    <div class="layui-input-inline" style="width: 390px">
                        <input type="text" name="graphicWapLink" th:value="${productGraphic.graphicWapLink}"
                               placeholder="请填写wap链接"
                               lay-verify="graphicWapLink" autocomplete="off" class="layui-input" maxlength="200"/>
                    </div>
                </div>
            </div>
            <div class="layui-split">&nbsp;</div>
            <div class="layui-form-item layui-layout-admin">
                <div class="layui-input-block">
                    <div class="layui-footer" style="left: 0;">
                        <button class="layui-btn" lay-submit="" lay-filter="zmn-form-submit">保存</button>
                        <button class="layui-btn layui-btn-primary"
                                onclick="zmnLayUtil.closeThisIframe(parent,{reloadPage: true})">取消</button>
                    </div>
                </div>
            </div>

        </form>

    </div>

</div>

<script type="text/javascript" th:inline="javascript">

    var json = {
        productGraphic: [[${productGraphic}]]
    };

    layui.config({
        base: "/static/lay/",
        version: "20211210"
    }).extend({
        index: "lib/index",
        plat_product_graphic_detail: "product/graphic/zmn.plat.product.graphic.edit",
    }).use(['index', 'plat_product_graphic_detail']);

</script>
</body>
</html>